//
//  ChangePasswordViewModel.m
//  DataStatistics
//
//  Created by 123456 on 16/6/20.
//  Copyright © 2016年 YTYangK. All rights reserved.
//

#import "ChangePasswordViewModel.h"
#import "ChangePasswordModel.h"

@implementation ChangePasswordViewModel

#pragma mark - 修改密码
+ (void)requestWithUrlForChangePassword:(id)obj  andParam:(NSDictionary *)param success:(void(^)(ChangePasswordModel * model))success failure:(void(^)(NSString * error))failure {
    MDC_INTER_DIC(@"/app/changePassword.do", @"NetMethodPOST", @"false")
    [super initRequestWithUrlObj:obj parametersDic:param Interface:inter success:^(id obj, id model) {
        NSLog(@"修改 ======  %@",model);
        if ([model[@"result"] isEqualToString:@"success"]) {
            
            success(model[@"msg"]);
            return;
        }else {
             failure(model[@"msg"]);
        }
    } failure:^(id obj, NSString *err) {
       [MBProgressHUD showError:err];//返回是因为需要列表拉下来
    }];
    
}


@end
